// 封装权限相关接口
import request from '@/utils/request'
// 获取权限
export function getPermissionList(params) {
  return request({
    method: 'get',
    url: '/permissions',
    params
  })
}
// 获取权限数量
export function liquantityPermission() {
  return request({
    method: 'get',
    url: '/permissions/count'
  })
}
// 新增权限
export function addPermission(data) {
  return request({
    method: 'post',
    url: '/permissions',
    data
  })
}
// 获取权限指定id
export function getPermissionDetails(id) {
  return request({
    method: 'get',
    url: '/permissions/' + id,

  })
}
// 编辑权限

export function editPermission(data) {
  return request({
    method: 'put',
    url: '/permissions/' + data.id,
    data
  })
}
// 删除权限
export function delPermission(id) {
  return request({
    method: 'delete',
    url: '/permissions/' + id,

  })
}